package com.car.vo;

import lombok.Data;

import java.io.Serializable;

/**
 * @author 党怡承
 * @since 2021-08-09
 */
@Data
public class JsonResult implements Serializable {
  private boolean flag;

  private String message;

  private Object data;

  public static JsonResult success(String message, Object data) {
    JsonResult jsonResult = new JsonResult();
    jsonResult.setFlag(true);
    jsonResult.setMessage(message);
    jsonResult.setData(data);
    return jsonResult;
  }
}
